<?php


class SendInfoTemplateDao {
	public function add($data){
		ClassManager::getSql()->insert('send_info_template', $data);
	}
	public function update($data,$id){
		ClassManager::getSql()->updates('send_info_template', $data,"where id=".intval($id));
	}
	public function count(){
		$count = ClassManager::getSql()->onedata('send_info_template',"count(*)  ");
		return  $count[0];
	}
	public function getList($limit=0){
		return  ClassManager::getSql()->datalist('send_info_template','*'," order by id desc ",$limit);
	}
	public function get($id){
		return ClassManager::getSql()->onedata('send_info_template','*',"where id=".intval($id));
	}
	public function deleteBatchByid($id){
		ClassManager::getSql()->delete('send_info_template',"where id in(".$id.")");
	}
	public function getListByType($type){
		return ClassManager::getSql()->datalist('send_info_template','*',"where type=".$type);
	}
}

?>